package com.yima.baseproj.utils;

import com.yima.baseproj.module.app.Controller.personnelModel.AuthDevicemodel;
import org.json.JSONException;
import org.json.JSONObject;

public class AuthDeviceJson {
    public static JSONObject authDeviceJson(AuthDevicemodel model) throws JSONException {
        JSONObject result = new JSONObject();
        result.putOpt("deviceNo", model.getDeviceNo());
        result.putOpt("admitGuids", model.getAdmitGuids());
        result.putOpt("type", model.getType());
        result.putOpt("passTime", model.getPassTime());
        result.putOpt("permissionTime", model.getPermissionTime());

        JSONObject permission = new JSONObject();
        permission.put("facePermission", 2);
        result.put("permission", permission);
        return result;
    }
}